﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinCourseControls
{
    public partial class FrmRadioButton : Form
    {
        public FrmRadioButton()
        {
            InitializeComponent();
        }

        private void rbtnSys01_CheckedChanged(object sender, EventArgs e)
        {
            if(rbtnSys01.Checked)
            {
                //打开子系统1的界面
                MessageBox.Show(rbtnSys01.Text);
            }
        }

        private void rbtnSys02_CheckedChanged(object sender, EventArgs e)
        {
            if (rbtnSys02.Checked)
            {
                //打开子系统1的界面
                MessageBox.Show(rbtnSys02.Text);
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            //获取选择的值
            string sex = rbtnMale.Checked ? rbtnMale.Text : rbtnFemale.Text;
            //state   0   1
            int state = rbtnNormal.Checked ? 1 : 0;
        }
    }
}
